package src.chapter06.e19;

import java.util.Iterator;
import java.util.Set;
import java.util.TreeMap;

public class E19 {
    public static void main(String[] args) {
        TreeMap map = new TreeMap();
        map.put(3,"李四");
        map.put(2,"王五");
        map.put(4,"赵六");
        map.put(6,"张三");
        Set keyset = map.keySet();
        Iterator it = keyset.iterator();
        while (it.hasNext()){
            Object key = it.next();
            System.out.println(key + ":" + map.get(key));
        }
    }
}
